#pragma once
#include "Character/Creature.h"
#include "BuffEffectCfg.h"
#include "BuffEffectInfo.h"
#include "base/core/singleton.h"

class BuffEffectInterface : public ManualSingleton<BuffEffectInterface>
{
	friend class ManualSingleton < BuffEffectInterface > ;
public:
	BuffEffectInterface();
	~BuffEffectInterface();
public:
	bool Init() { return true; }
	bool UnInit() { return true; }
public:
	//添加buff state bag 给 creature
	bool sendEffectToCreature(Creature* pSender, Creature* pRecv, uint32_t skillId, uint32_t buffBagId, uint32_t stateBagRate, uint32_t stateBagTime, const std::string& param);
public:
	Creature* GetBuffSender(BuffBagEffectInfo* pBuffBag, Creature* pRecv);
	Creature* GetBuffSender(CharIDType senderCid, Creature* pRecv);
};

#define g_MakeBuffEffectInterface() (BuffEffectInterface::Instance())
#define g_GetBuffEffectInterface()  (BuffEffectInterface::GetInstance())
#define g_DelBuffEffectInterface()  (BuffEffectInterface::Destroy())
